local baihu = fk.CreateSkill{
  name = "hx__white_tiger&"
}

Fk:loadTranslationTable{
  ["hx__white_tiger&"] = "白虎",
  [":hx__white_tiger&"] = "你可以将一张牌当【杀】或【闪】使用或打出。"
}

baihu:addEffect("viewas", {
  pattern = "slash,jink",
  interaction = function (self, player)
    local card_names = {"slash", "jink"}
    local choices = player:getViewAsCardNames(baihu.name, card_names)
    return UI.CardNameBox{
      choices = choices
    }
  end,
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0
  end,
  view_as = function (self, player, cards)
    if #cards == 0 then return end
    local card = Fk:cloneCard(self.interaction.data)
    card:addSubcard(cards[1])
    card.skillName = baihu.name
    return card
  end,
  before_use = function (self, player, use)
    local room = player.room
    room:removePlayerMark(player, "@!!white_tiger", 1)
    if player:getMark("@!!white_tiger") == 0 then
      player:loseFakeSkill(baihu.name)
    end
  end
})

return baihu